<template>
	<view class="container">
		<view class="share-box">
			<image class="share-img" :src="shareImgUrl"></image>
		</view>
		
	</view>
</template>

<script>
	import footerMenu from "@/components/footer-menu.vue"
	import tuiIcon from "@/components/thorui/tui-icon/tui-icon.vue"

	export default {
		components: {
			footerMenu,
			tuiIcon,
		},
		data() {
			return {
				height: 64, //header高度
				top: 0, //标题图标距离顶部距离
				scrollH: 0, //滚动总高度
				opcity: 0,
				iconOpcity: 0.5,
				
				shareImgUrl: 'http://wz.syrcj.com/runtime/push/redpack_20200110_23.png',
				
				goodsId: 0,
				goodsName: '',
				goodsLogo: '',
				goodsMoney: 0,
			}
		},
		
		methods: {
			
			getGoodsInfo: function(goodsId) {
				uni.request({
				    url: this.$apiUrl+ '/api/goods/view?id='+goodsId,
					header: {
						'userId': uni.getStorageSync('userId'),
						'userToken': uni.getStorageSync('userToken'),
'shopId': uni.getStorageSync('shopId'),
					},
				    data: {},
				    success: (res) => {
						let resData = res.data['data'];
						this.goodsName = resData.name;
						this.goodsLogo = resData.img_logo;
						this.goodsMoney = resData.money;
				    }
				});
			},
			

			
			//用户分享该商品的图片
			doShareGoodsImg: function() {
				let uid = uni.getStorageSync('memberId');	//用户ID
				
			
				let shareImgUrl = 'http://wz.syrcj.com/runtime/push/redpack_20200110_23.png';
				this.tui.toast('AAAA'+uid);
			
			},

			
			
		},
		
		
		
		onLoad: function(options) {
			let obj = {};
			setTimeout(() => {
				uni.getSystemInfo({
					success: (res) => {
						this.width = obj.left || res.windowWidth;
						this.height = obj.top ? (obj.top + obj.height + 8) : (res.statusBarHeight + 44);
						this.top = obj.top ? (obj.top + (obj.height - 32) / 2) : (res.statusBarHeight + 6);
						this.scrollH = res.windowWidth
					}
				})
			}, 50);
			
			this.goodsId = options.id;
			
		//	this.getGoodsInfo(this.goodsId);
		},
		
	
		
		onShow() {
			
			
		}
		
		
	}
</script>

<style>
	page {
		background: #000;
	}

	.container {
		padding-bottom: 110rpx;
	}
	
	.share-box{margin: 100rpx;}
	.share-img{width:550rpx;height: 1000rpx;}


</style>